package fenyu.personblob.bean.databean;

import fenyu.personblob.bean.Bean;
import fenyu.personblob.single.SinglePathDoor;

/**
 * create at 2018/12/21 21:52
 *
 * @author 纷羽 <gzj0078@gmail.com>
 */
public abstract class User extends Bean {

    private String username;

    private String password;

    private String nickname;

    private String token;

    private Integer statue = 1;

    @Override
    public String type() {
        return " user";
    }

    public abstract String identify();

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getStatue() {
        return statue;
    }

    public void setStatue(Integer statue) {
        this.statue = statue;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public void changePassword(String new_pass) {
        this.setPassword(new_pass);
        SinglePathDoor.getSingleSave().getSaveDoor().getUserSavePath().save(this);
    }
}
